package com.appsl.digitalparking;

import com.appsl.manager.Redirection;

import android.os.Bundle;
import android.app.Activity;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MotionEvent;

public class LoginGP extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_login_gp);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.login_g, menu);
		return true;
	}
	
	@Override 
	public boolean onTouchEvent(MotionEvent e)
	{
		//En caso se toque la pantalla de presentacion, se pasa a la pantalla de login		
		Redirection.goToFavMap(this);	
		return true;
	}
	
	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
	    if ((keyCode == KeyEvent.KEYCODE_BACK)) 
	    { //Back key pressed
	    	Redirection.goToLogin(this);
	        return true;
	    }
	    return super.onKeyDown(keyCode, event);
	}
}
